package cn.zucc.edu.bruce.iot.send;



import java.io.Serializable;

import cn.zucc.edu.bruce.iot.DataDeal;

public class SendDecData implements Serializable {
    private int sensorNumber;
    private int number1;
    private int number2;
    private int number3;

    public SendDecData(int sensorNumber) {
        this.sensorNumber = sensorNumber;
        this.number1 = 0;
        this.number2 = 0;
        this.number3 = 0;
    }

    public byte[] getDecBytes() {
        byte[] bytesSensor = new byte[16];
        System.arraycopy(DataDeal.intToBytes(this.sensorNumber), 0, bytesSensor, 0, 4);
        System.arraycopy(DataDeal.intToBytes(this.number1), 0, bytesSensor, 4, 4);
        System.arraycopy(DataDeal.intToBytes(this.number2), 0, bytesSensor, 8, 4);
        System.arraycopy(DataDeal.intToBytes(this.number3), 0, bytesSensor, 12, 4);

        return bytesSensor;
    }

    public int getSensorNumber() {
        return sensorNumber;
    }

    public void setSensorNumber(int sensorNumber) {
        this.sensorNumber = sensorNumber;
    }

    public int getNumber1() {
        return number1;
    }

    public void setNumber1(int number1) {
        this.number1 = number1;
    }

    public int getNumber2() {
        return number2;
    }

    public void setNumber2(int number2) {
        this.number2 = number2;
    }

    public int getNumber3() {
        return number3;
    }

    public void setNumber3(int number3) {
        this.number3 = number3;
    }
}
